﻿<%@ Page Title="" Language="C#" MasterPageFile="Site.Master" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="ResearchRepository.RRAdmin" %>

<asp:Content ID="adminHead" ContentPlaceHolderID="pageHead" runat="server">
</asp:Content>

<asp:Content ID="adminContent" ContentPlaceHolderID="pageContent" runat="server">
	<span style="font-weight: bold">
		Pending Requests
	</span>
    <div style="font-weight: normal">
        <br />
		<div class="adminGridDiv">
			<asp:GridView ID="requestGrid" runat="server" GridLines="None" AutoGenerateColumns="true"
				OnRowDataBound="gridRowDataBound" OnSelectedIndexChanged="gridRowSelected">
				<EmptyDataTemplate>
					No pending requests.
				</EmptyDataTemplate>
				<RowStyle CssClass="browseGridRow" />
				<AlternatingRowStyle CssClass="browseGridAltRow" />
				<SelectedRowStyle CssClass="browseGridSelectRow" />
				<Columns>
					<%-- select button is required for each row to enable row selection --%>
					<%-- to allow selection by clicking anywhere on the row, select buttons are hidden and an onClick event is added (by gridRowDataBound) to each row to raise the SelectedIndexChanged event --%>
					<asp:CommandField ShowSelectButton="true" ControlStyle-CssClass="hiddenControl" />
					<%-- TODO manually define desired column templates --%>
					<%--asp:BoundField HeaderText="reqID" DataField="reqID" />
					<asp:BoundField HeaderText="userID" DataField="userID" /--%>
				</Columns>
			</asp:GridView>
		</div>
		<asp:Button ID="refreshListButton" runat="server" OnClick="refreshListButton_Click" Text="Refresh List" />
        <br />
        Comments:
		<br />
        <asp:TextBox ID="commentsBox" runat="server" Height="120px" Width="600px" TextMode="MultiLine"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="approveRequestButton" runat="server" Text="Approve" 
            OnClick="approveRequestButton_Click" />
		&nbsp;
        <asp:Button ID="rejectRequestButton" runat="server" Text="Reject" 
            OnClick="rejectRequestButton_Click" />
		<br />
		<br />
		<asp:Label ID="statusLabel" runat="server">Select a request.</asp:Label>
    </div>
</asp:Content>